#include "map.h"
#include "config.h"
map::map() {
    //初始化加载地图对象
    m_map1.load(MAP_PATH);
    m_map2.load(MAP_PATH);
    m_map1_posX = GAME_WIDTH;
    m_map2_posX = 0;
    m_scroll_speed =MAP_SCORLL_SPEED;

}

void map::mapPosition()
{
    //m_map1_posX-=m_scroll_speed;//不要滚动地图
    if(m_map1_posX<=0){
        m_map1_posX=GAME_WIDTH;
    }
    //m_map2_posX-=m_scroll_speed;//不要滚动地图
    if(m_map2_posX<=-GAME_WIDTH){
        m_map2_posX=0;
    }
}
